<template>
  <div class="app">
    <!-- 链接 -->
    <div>
      <router-link to="/index">首页</router-link> |
      <router-link to="/about">关于</router-link> |
      <router-link to="/users">用户</router-link> |
      <button @click="handleJump">首页</button>
    </div>

    <!-- 视图 -->
    <router-view name="nav" />
    <router-view name="side" />
    <!-- 未命名的 router-view 其名称为 default -->
    <router-view />

    <!-- <RouterView /> -->
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {}
  },
  methods: {
    handleJump() {
      this.$router.push('/index')
    },
  },
}
</script>

<style scoped>

</style>
